From 6a67df79a8f40c488f9098170109eacba45ec2cc Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 20 Dec 2015 14:40:49 -0500 Subject: [PATCH] inspector: Avoid criticals in the css editro We can't keep text iters around after text buffer has been changed. Just clear the list errors when the buffer changes before we've passed it again. --- gtk/inspector/css-editor.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gtk/inspector/css-editor.c b/gtk/inspector/css-editor.c index d5547841f0..bdfe762edd 100644 --- a/gtk/inspector/css-editor.c +++ b/gtk/inspector/css-editor.c @@ -308,6 +308,9 @@ text_changed (GtkTextBuffer *buffer, g_source_remove (ce->priv->timeout); ce->priv->timeout = g_timeout_add (100, update_timeout, ce); + + g_list_free_full (ce->priv->errors, css_error_free); + ce->priv->errors = NULL; } static void -- 2.30.2